package cn.iune.erp.accounting;

import java.math.BigDecimal;
import java.text.ParseException;

import com.alibaba.fastjson.JSONObject;

import cn.iune.common.base.IBizDataIface;

public interface IAccountVoucherService extends IBizDataIface {

	public void insert(AccountVoucher a);
	
	public void update(AccountVoucher a);

	public void delete(String fID);

	AccountVoucher getByID(String fID);

	AccountVoucher getByNo(String voucherNo, String enterpriseNo);

	int confirm(String fID);

	int confirm(AccountVoucher a);

	int active(String fID);

	int active(AccountVoucher a);

	int open(String fID);

	int open(AccountVoucher a);

	int close(String fID);

	int close(AccountVoucher a);

	int unAgree(AccountVoucher a);

	int unAgree(String fID);

	int agreeIt(AccountVoucher a, String cUsercode, String cUsername, String userId);

	int agreeIt(String fID, String cUsercode, String cUsername, String userId);

	int doIt(AccountVoucher a);

	int unDo(AccountVoucher a);

	int updateMaxDetailNo(String fID, int maxDetailNo);

	int updateMaxDetailNo(String accountInvoiceNo, String billType, String enterpriseNo, int maxDetailNo);

	void afterInsert(AccountVoucher obj);

	void beforeDelete(String fID);

	//作为主表
	AccountVoucher packing(String billType, String billTypeName, String systemCode, int flowType, int direction,
			String autoCode, String origin, String originName, String billNo, String cUsercode, String cUsername,
			String userId, String enterpriseNo, String enterpriseName);

	JSONObject save(JSONObject object) throws ParseException;

	JSONObject newDataDetail(JSONObject param);

	JSONObject queryDataDetail(JSONObject param);

	JSONObject saveDetail(JSONObject object) throws ParseException;

	AccountVoucher insert(String billType, String billTypeName, String systemCode, int flowType, int direction,
			String autoCode, String origin, String originName, String originNo, String billNo, BigDecimal debitAmount,
			BigDecimal creditAmount, String wordsAmount, int attachQuantity, String cUsercode, String cUsername,
			String userId, String enterpriseNo, String enterpriseName);

	AccountVoucher packing(String origin, String originName, String originNo, String billType, String billTypeName,
			String systemCode, int flowType, int direction, String cUsercode, String cUsername, String userId,
			String enterpriseNo, String enterpriseName);






}